<p>Java 7 introduced the diamond operator (<code>&lt;&gt;</code>) to reduce the verbosity of generics code. For instance, instead of having to declare
a <code>List</code>'s type in both its declaration and its constructor, you can now simplify the constructor declaration with <code>&lt;&gt;</code>,
and the compiler will infer the type.</p>
<p><strong>Note</strong> that this rule is automatically disabled when the project’s <code>sonar.java.source</code> is lower than <code>7</code>.</p>
<h2>Noncompliant Code Example</h2>
<pre>
List&lt;String&gt; strings = new ArrayList&lt;String&gt;();  // Noncompliant
Map&lt;String,List&lt;Integer&gt;&gt; map = new HashMap&lt;String,List&lt;Integer&gt;&gt;();  // Noncompliant
</pre>
<h2>Compliant Solution</h2>
<pre>
List&lt;String&gt; strings = new ArrayList&lt;&gt;();
Map&lt;String,List&lt;Integer&gt;&gt; map = new HashMap&lt;&gt;();
</pre>

